<?php


namespace app\admin\controller\v1;


use app\common\controller\BaseController;
use app\common\model\Catetype as CatetypeModel;

class Catetype extends BaseController
{
    public function index()
    {
        $list = (new CatetypeModel())->catetypeList();
        return self::showResCode('获取成功',$list);
    }

    //
    public function save()
    {
        //验证参数(预留)

       $data = (new CatetypeModel())->Mcreate();
        return self::showResCode('添加成功',$data);
    }

    public function update()
    {
        //验证字段（预留）

        $data = (new CatetypeModel())->updateCatetype();
        return self::showResCode('编辑成功',$data);
    }
}